#include <iostream>
#include <vector>
using namespace std;
int getMax(vector<int>& a, int L, int R) {
    if(L == R)  {
        return a[L]; 
    }
    int mid = L + ((R - L) >> 1);
    int leftMax = getMax(a, L, mid);
    int rightMax = getMax(a, mid + 1, R);
    return max(leftMax, rightMax);
}
int main() {
    vector<int> a = {1, 45, 56, 38, 88, 99, 10};
    cout << "Max : " << getMax(a, 0, a.size());
    return 0;
}